#ifndef QTCPFILERECIEVE_H
#define QTCPFILERECIEVE_H

#include <QWidget>
#include <QTcpSocket>
#include <QDebug>
#include <QFile>
#include <QFileDialog>
#include <QHostAddress>
#include <QThread>
#include <QByteArray>

namespace Ui {
class QTcpFileRecieve;
}

class QTcpFileRecieve : public QWidget
{
    Q_OBJECT

public:
    explicit QTcpFileRecieve(QWidget *parent = nullptr);
    ~QTcpFileRecieve();

private slots:
    void on_connectButton_clicked();

    void on_downloadButton_clicked();

    void on_SelectDownloadPath_clicked();

    void on_disconnectButton_clicked();

private:
    Ui::QTcpFileRecieve *ui;
    QTcpSocket* qTcpSocket;
    QFile qFile;
    qint64 recieveSize;
    qlonglong fileSize;
    bool isOpenSuccess;
    QString saveFileName;
};

#endif // QTCPFILERECIEVE_H
